﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RussiaLibrary 
{
    class IPolygons : Class_Polygon
    {
        public override bool Init(byte[,] Bytes_TetrisByte) //重写长条形方块的初始化；
        {
            State = Class_Common.GetRandomInt() % 2; //长条形的放开初始化只有两种情况，所以除以2的余数来表示状态。
            Console.WriteLine("IPolygons State={0}", State);
            bool ret = false;
            switch(State)
            {
                case 0://0表示纵向
                   ret = InitBase(Bytes_TetrisByte,new KeyValuePair<int,int>(0,4),new KeyValuePair<int,int>(1,4),
                                                    new KeyValuePair<int, int>(2, 4), new KeyValuePair<int, int>(3, 4));
                break;
                case 1://1表示横向
                   ret = InitBase(Bytes_TetrisByte, new KeyValuePair<int, int>(0, 3), new KeyValuePair<int, int>(0, 4),
                                                    new KeyValuePair<int, int>(0, 5),new KeyValuePair<int, int>(0, 6));
                break;
                default:
                break;
            }
            return ret; 
        }
    }
}
